package com.vastcom.sigma.admin.dao;

import com.vastcom.sigma.admin.model.Rawbeaninventorychange;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface RawBeanInventoryChangeDao extends JpaRepository<Rawbeaninventorychange,String> {

    @Query("select c from Rawbeaninventorychange c where c.type=:type")
    List<Rawbeaninventorychange> getRawbeaninventorychangesByType(@Param("type") String type);


    @Query("select c from Rawbeaninventorychange  c order by c.changedate desc ")
    List<Rawbeaninventorychange> getAllByChangedate();

}
